Keycloak REST Services 1.5.0-Final

Path: / admin / realms / {realm} / users / {id} / role-mappings / realm

Get realm-level role mappings for this user

Path parameters:
realm - realm name (not id!)
id - user id

Sub-Resources
Resources
NameDescription
availableRealm-level roles that can be mapped to this user
compositeEffective realm-level role mappings for this user.

Resource Methods
Method Summary
NameDescription
GET /admin/realms/{realm}/users/{id}/role-mappings/realmGet realm-level role mappings for this user
POST /admin/realms/{realm}/users/{id}/role-mappings/realmAdd realm-level role mappings
DELETE /admin/realms/{realm}/users/{id}/role-mappings/realmDelete realm-level role mappings

Method Detail

GET /admin/realms/{realm}/users/{id}/role-mappings/realm

Get realm-level role mappings for this user

HTTP Example:
GET /admin/realms/{realm}/users/{id}/role-mappings/realm
API Example:

UsersResource.getRealmRoleMappings({'realm': /* name realm name (not id!) */,
  'id': /* id user id */});

Output:
List<RoleRepresentation> -
Produces:
application/json

POST /admin/realms/{realm}/users/{id}/role-mappings/realm

Add realm-level role mappings

HTTP Example:
POST /admin/realms/{realm}/users/{id}/role-mappings/realm
API Example:

UsersResource.addRealmRoleMappings({'realm': /* name realm name (not id!) */,
  'id': /* id */,
  '$entity': /* roles */});

Input:
List<RoleRepresentation>
Output:
void
Consumes:
application/json

DELETE /admin/realms/{realm}/users/{id}/role-mappings/realm

Delete realm-level role mappings

HTTP Example:
DELETE /admin/realms/{realm}/users/{id}/role-mappings/realm
API Example:

UsersResource.deleteRealmRoleMappings({'realm': /* name realm name (not id!) */,
  'id': /* id user id */,
  '$entity': /* roles */});

Input:
List<RoleRepresentation>
Output:
void
Consumes:
application/json

Keycloak REST Services 1.5.0-Final